// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'StudentID',
        footer: "Foots",
        cnName: '学生基本信息',
        name: 'Nyz_Students',
        url: "/Nyz_Students/",
        sortName: "CreateDate"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"StudentNo":"","IDCardNo":"","Name":"","Gender":"","BirthDate":"","PhotoPath":"","EnrollmentDate":"","Status":"","ContactPhone":"","GraduationDate":"","ClassID":"","MajorID":""};
    const editFormOptions = [[{"title":"学生学号","field":"StudentNo","disabled":true},
                               {"title":"身份证号","field":"IDCardNo"},
                               {"title":"姓名","field":"Name"},
                               {"dataKey":"学生性别","data":[],"title":"性别","field":"Gender","type":"select"}],
                              [{"title":"出生日期","field":"BirthDate","type":"date"},
                               {"title":"照片路径","field":"PhotoPath","type":"img"}],
                              [{"title":"联系电话","field":"ContactPhone"},
                               {"title":"入学日期","field":"EnrollmentDate","type":"date"},
                               {"dataKey":"学生状态","data":[],"title":"状态","field":"Status","type":"select"}],
                              [{"title":"结业日期","field":"GraduationDate","type":"date"},
                               {"title":"所属班级ID","field":"ClassID"},
                               {"title":"专业ID","field":"MajorID"}]];
    const searchFormFields = {"StudentNo":"","IDCardNo":"","Name":"","Gender":"","BirthDate":"","EnrollmentDate":""};
    const searchFormOptions = [[{"title":"学生学号","field":"StudentNo","type":"like"},{"title":"身份证号","field":"IDCardNo"},{"title":"姓名","field":"Name"}],[{"dataKey":"学生性别","data":[],"title":"性别","field":"Gender","type":"select"},{"title":"出生日期","field":"BirthDate"},{"title":"入学日期","field":"EnrollmentDate"}]];
    const columns = [{field:'StudentID',title:'StudentID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StudentNo',title:'学生学号',type:'string',link:true,width:110,readonly:true,align:'left'},
                       {field:'IDCardNo',title:'身份证号',type:'string',width:110,align:'left'},
                       {field:'Name',title:'姓名',type:'string',width:110,align:'left'},
                       {field:'Gender',title:'性别',type:'string',bind:{ key:'学生性别',data:[]},width:110,align:'left'},
                       {field:'BirthDate',title:'出生日期',type:'date',width:150,align:'left'},
                       {field:'PhotoPath',title:'照片路径',type:'img',width:220,align:'left'},
                       {field:'EnrollmentDate',title:'入学日期',type:'datetime',width:150,align:'left'},
                       {field:'GraduationDate',title:'结业日期',type:'datetime',width:150,align:'left'},
                       {field:'ClassID',title:'所属班级ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'MajorID',title:'专业ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'Status',title:'状态',type:'byte',bind:{ key:'学生状态',data:[]},width:110,align:'left'},
                       {field:'ContactPhone',title:'联系电话',type:'string',width:110,align:'left'},
                       {field:'Email',title:'电子邮箱',type:'string',width:120,align:'left'},
                       {field:'HomeAddress',title:'家庭地址',type:'string',width:180,align:'left'},
                       {field:'EmergencyContact',title:'紧急联系人',type:'string',width:110,align:'left'},
                       {field:'EmergencyPhone',title:'EmergencyPhone',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Remark',title:'Remark',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left'},
                       {field:'CreateID',title:'创建人ID',type:'int',width:100,hidden:true,align:'left'},
                       {field:'ModifyID',title:'修改人ID',type:'int',width:100,hidden:true,align:'left'}];
    const detail =  {
                    cnName: '学生联系方式',
                    table: 'Nyz_StudentContacts',
                    columns: [{field:'ContactID',title:'ContactID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StudentID',title:'StudentID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'ContactType',title:'联系方式类型',type:'byte',width:110,edit:{type:''},align:'left'},
                       {field:'ContactValue',title:'联系号码',type:'string',width:120,edit:{type:''},align:'left'},
                       {field:'IsPrimary',title:'是否主要联系方式',type:'bool',width:110,edit:{type:''},align:'left'},
                       {field:'CreateID',title:'CreateID',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'Creator',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'CreateDate',type:'datetime',width:150,hidden:true,align:'left'},
                       {field:'ModifyID',title:'ModifyID',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'Modifier',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'ModifyDate',type:'datetime',width:150,hidden:true,align:'left'}],
                    sortName: 'CreateDate',
                    key: 'ContactID'
                                            };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}